package edu.suda.cxtz.utils;

import edu.suda.cxtz.modules.exception.BadRequestException;

public class ValidationUtil {
    public static void isNull(Object obj, String entity, String parameter, Object value) {
        if (obj == null) {
            String msg = entity + " 不存在: " + parameter + " is " + value;
            throw new BadRequestException(msg);
        }
    }
}
